/*
 * $Id: PdTag.java,v 1.1 2009/07/06 16:47:32 afaichun Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.onwatch.xml.tag;

import java.util.ArrayList;

public class PdTag {
	private String id = null;
	private String pdStartId = null;
	private ArrayList<OnExitTag> onExits = new ArrayList<OnExitTag>();
	private ArrayList<AddTaskTag> addTasks = new ArrayList<AddTaskTag>();
	private ArrayList<ModifyTaskTag> modifyTasks = new ArrayList<ModifyTaskTag>();
	private ArrayList<DeleteTaskTag> deleteTasks = new ArrayList<DeleteTaskTag>();
	private ArrayList<UninstallTaskTag> uninstallTasks = new ArrayList<UninstallTaskTag>();
	private ArrayList<InstallTaskTag> installTasks = new ArrayList<InstallTaskTag>();
	
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public String getPdStartId() {
		return pdStartId;
	}
	
	public void setPdStartId(String pdStartId) {
		this.pdStartId = pdStartId;
	}
	
	public ArrayList<AddTaskTag> getAddTasks() {
		return addTasks;
	}
	public void setAddTasks(ArrayList<AddTaskTag> addTasks) {
		this.addTasks = addTasks;
	}
	public void addAddTask(AddTaskTag addTask) {
		this.addTasks.add(addTask);
	}
	
	public ArrayList<ModifyTaskTag> getModifyTasks() {
		return modifyTasks;
	}
	public void setModifyTasks(ArrayList<ModifyTaskTag> modifyTasks) {
		this.modifyTasks = modifyTasks;
	}
	public void addModifyTask(ModifyTaskTag modifyTask) {
		this.modifyTasks.add(modifyTask);
	}
	
	public ArrayList<DeleteTaskTag> getDeleteTasks() {
		return deleteTasks;
	}
	public void setDeleteTasks(ArrayList<DeleteTaskTag> deleteTasks) {
		this.deleteTasks = deleteTasks;
	}
	public void addDeleteTask(DeleteTaskTag deleteTask) {
		this.deleteTasks.add(deleteTask);
	}

	public ArrayList<InstallTaskTag> getInstallTasks() {
		return installTasks;
	}
	public void setInstallTasks(ArrayList<InstallTaskTag> installTasks) {
		this.installTasks = installTasks;
	}
	public void addInstallTask(InstallTaskTag installTask) {
		this.installTasks.add(installTask);
	}
	
	public ArrayList<UninstallTaskTag> getUninstallTasks() {
		return uninstallTasks;
	}
	public void setUninstallTasks(ArrayList<UninstallTaskTag> uninstallTasks) {
		this.uninstallTasks = uninstallTasks;
	}
	public void addUninstallTask(UninstallTaskTag uninstallTask) {
		this.uninstallTasks.add(uninstallTask);
	}
	public ArrayList<OnExitTag> getOnExits() {
		return onExits;
	}
	public void addOnExit(OnExitTag onExit) {
		onExits.add(onExit);
	}
	
	public String toString() {
		StringBuffer msg = new StringBuffer();
		msg.append(PdTag.class.getName()).append(":\n");
		msg.append("{id: ").append(this.getId()).append("}");
		msg.append("{pdStartTaskId: ").append(getPdStartId()).append("}");
		for(AddTaskTag addTaskTag: addTasks) {
			msg.append(addTaskTag.toString());
		}
		for(InstallTaskTag installTaskTag: installTasks) {
			msg.append(installTaskTag.toString());
		}
		for(UninstallTaskTag uninstallTaskTag: uninstallTasks) {
			msg.append(uninstallTaskTag.toString());
		}
		for(ModifyTaskTag modifyTaskTag: modifyTasks) {
			msg.append(modifyTaskTag.toString());
		}
		for(DeleteTaskTag deleteTaskTag: deleteTasks) {
			msg.append(deleteTaskTag.toString());
		}
		for(OnExitTag onExitTag: onExits) {
			msg.append(onExitTag.toString());
		}
		msg.append("\n");
		return msg.toString();
	}
}
